import { Component, Prop } from "vue-property-decorator";
import { VC } from "@/VC-vue";
import Config from "./typeConfig";
import styles from "./style.less";
import { GlobalStore } from "../../store/global";
import { DEVICE_TYPE } from "../../utils/device";
interface excepProp {
    type: string;
}
@Component
export default class WorkPlace extends VC<excepProp> {
    @Prop() type!: string;
    get isMobile() {
        return GlobalStore.device === DEVICE_TYPE.MOBILE;
    }
    navigateTo() {
        this.$router.push({
            path: "/"
        });
    }
    protected render() {
        return (
            <div class={styles.exception}>
                <div class={this.isMobile ? styles.mb_img : styles.img}>
                    <img src={Config[this.type].img} />
                </div>
                <div class={this.isMobile ? styles.mb_content : styles.content}>
                    <h1>{Config[this.type].title}</h1>
                    <div class={styles.desc}>{Config[this.type].desc}</div>
                    <div class={styles.action}>
                        <a-button type="primary" onclick={this.navigateTo}>
                            返回首页
                        </a-button>
                    </div>
                </div>
            </div>
        );
    }
}
